﻿using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;
namespace ugui.demo1
{
    public class Drop_IDropHander : MonoBehaviour,

        IDropHandler


    {
        //Drag拖拽，释放时候出发
        //test result:从白色图片开始拖拽（Drag),在绿色图片释放（Drop),只有拖拽的Widget挂载的脚本实现IDragHandler接口，
        //释放的的Widget挂载的脚本实现IDropHandler,释放的的Widget挂载的脚本的OnDrop就会触发
        //参考UnitySamples_UI项目的Drag And Drop.unity
        public void OnDrop(PointerEventData eventData)
        {
            Debug.LogError(gameObject.name+" OnDrop ");

            //8 eventData.lastPress
            Debug.LogError(gameObject.name+ " OnDrop:" + eventData.lastPress);
        }
    }
}
